var e = require("@babel/runtime/helpers/interopRequireWildcard").default,
  r = require("@babel/runtime/helpers/interopRequireDefault").default,
  n = require("@babel/runtime/helpers/regeneratorRuntime"),
  t = require("@babel/runtime/helpers/asyncToGenerator"),
  i = r(require("./js/common/Const")),
  u = r(require("./js/globalConfig/globalConfig")),
  o = require("./js/api/C2API"),
  a = (r(require("./js/sensor/BeaconSensor")), e(require("./js/LocationApp"))),
  s = require("./js/utils/storage"),
  l = require("./js/common/user"),
  c = r(require("./js/Location/LocationHelper"));
module.exports = {
  setEnv: function (e) {
    requireMiniProgram().env = e;
  },
  getEnv: function () {
    return requireMiniProgram().env;
  },
  enablePluginRequest: function (e) {
    requireMiniProgram().pluginWx = e ? wx : void 0;
  },
  setUserId: function () {
    l.setUserId.apply(void 0, arguments);
  },
  getUserId: function () {
    return (0, l.getUserId)();
  },
  isStorageUserId: function () {
    return "1" === (0, s.getStorage)("isStorageUser");
  },
  getSensorManager: function () {
    return a.sensorManager;
  },
  setNavigationBarTitle: function (e) {
    e.title && (i.default.NAVIGATION_BAR.TEXT = e.title);
  },
  setApiOptions: function () {
    var e = arguments.length > 0 && void 0 !== arguments[0] ? arguments[0] : {};
    e.apiHost && (u.default.apiHost = e.apiHost),
      e.apiPrefix && (u.default.apiPrefix = e.apiPrefix);
  },
  thirdAuth: function (e) {
    return t(
      n().mark(function r() {
        return n().wrap(function (r) {
          for (;;)
            switch ((r.prev = r.next)) {
              case 0:
                return r.abrupt("return", o.C2API.thirdAuth(e));
              case 1:
              case "end":
                return r.stop();
            }
        }, r);
      }),
    )();
  },
  setKey: function (e) {
    a.default.key = e;
  },
  createLocation: function (e) {
    var r = new a.default();
    return r.create(e), r;
  },
  setEngine: function (e) {
    requireMiniProgram().LocationEngineClass = e;
  },
  getEngine: function () {
    return c.default.getEngine();
  },
  version: u.default.sv,
};
